3210d6092b56edf7f9e3b5b544a360f07bcf5a7a,server/sonar-server/src/main/java/org/sonar/server/rule/CommonRuleDefinitionsImpl.java,CommonRuleDefinitionsImpl,defineDuplicatedBlocksRule,#RulesDefinition.NewRepository#,107
Before Change
RulesDefinition.NewRule rule = repo.createRule(CommonRuleKeys.DUPLICATED_BLOCKS);
rule.setName("Source files should not have any duplicated blocks")
.addTags("pitfall")
.setHtmlDescription("An issue is created on a file as soon as there is at least one block of duplicated code on this file")
.setDebtSubCharacteristic(RulesDefinition.SubCharacteristics.LOGIC_CHANGEABILITY)
.setDebtRemediationFunction(rule.debtRemediationFunctions().linearWithOffset("10min", "10min"))
.setEffortToFixDescription("number of duplicate blocks")
.setSeverity(Severity.MAJOR);
}
After Change
RulesDefinition.NewRule rule = repo.createRule(CommonRuleKeys.DUPLICATED_BLOCKS);
rule.setName("Source files should not have any duplicated blocks")
.addTags("pitfall")
.setHtmlDescription("An issue is created on a file as soon as there is at least one block of duplicated code on this file")
.setDebtRemediationFunction(rule.debtRemediationFunctions().linearWithOffset("10min", "10min"))
.setEffortToFixDescription("number of duplicate blocks")
.setSeverity(Severity.MAJOR);
}